<template>
  <div class="order_list">
    <my-header>
        <template #left>
        <van-icon name="arrow-left" @click="$router.back()" />
      </template>
      <template #center> 我的订单 </template>
    </my-header>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
import myHeader from '../../components/myHeader.vue';
import { getOrder } from '../../api/secendPage/index';
export default {
  components: { myHeader },
  setup() {
    const data = reactive({
        list:[]
    })
    getOrder({token:localStorage.getItem('token')}).then(res => {
        data.list = res.data.orderList;
    })
    return {
      ...toRefs(data)
    }
  },
};
</script>
<style lang="scss" scoped>
.order_list{
  height: 100%;
}
</style>